Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(recipes): Add jelly xml declaration #355

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

gounthar
Copy link
Contributor

@gounthar gounthar commented Oct 23, 2024

Work in Progress: Current Implementation Issues
This is an attempt to solve #349.

Current development is blocked by test failures. Here are the specific issues:

  1. Test File Suffix Mismatch:
  • The added test is failing due to incorrect file suffix handling
  • System generates file.txt despite the test [creating example.jelly](https://github.com/gounthar/plugin-modernizer-tool/blob/add-jelly-xml-declaration/plugin-modernizer-core/src/test/java/io/jenkins/tools/pluginmodernizer/core/recipe/AddJellyXmlDeclarationTest.java#L36)
  • This naming inconsistency prevents proper test execution
  1. Configuration Property:

Status: Working to resolve these issues before proceeding with further development.

Testing done

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

Fixes #51

Add a new recipe to ensure the XML declaration is present in all Jelly files.

* Add `AddJellyXmlDeclaration` recipe to `plugin-modernizer-core/src/main/resources/META-INF/rewrite/recipes.yml`.
* Create `AddJellyXmlDeclaration` class in `plugin-modernizer-core/src/main/java/io/jenkins/tools/pluginmodernizer/core/recipe/AddJellyXmlDeclaration.java`.
* Implement logic to add XML declaration to existing `.jelly` files using `PlainTextVisitor`.
* Create `AddJellyXmlDeclarationTest` class in `plugin-modernizer-core/src/test/java/io/jenkins/tools/pluginmodernizer/core/recipe/AddJellyXmlDeclarationTest.java`.
* Write unit tests to verify the `AddJellyXmlDeclaration` recipe.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/gounthar/plugin-modernizer-tool/issues/51?shareId=XXXX-XXXX-XXXX-XXXX).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant